package com.chuantou.yuba.api;

import android.net.Uri;

import com.chuantou.yuba.YBApp;

public class UriHelper {

	public static final String PARAMS_MOBILE = "mobile";

	public static final String PARAMS_CODE = "code";

	public static final String PARAMS_EMAIL = "email";

	public static final String PARAMS_PASSWORD = "pwd";

	public static final String PARAMS_POINT = "point";

	public static final String PARAMS_PLATFORM = "platform";

	public static final String PARAMS_SIGN = "sign";

	public static final String PARAMS_AVATAR = "headimg";

	public static final String PARAMS_BACKGROUND = "background";

	public static final String PARAMS_REPASSWORD = "pwd_confirm";

	public static final String PARAMS_USERNAME = "username";

	public static final String PARAMS_BIRTHDAY = "birthday";

	public static final String PARAMS_SEX = "sex";

	public static final String PARAMS_PROVINCE = "state";

	public static final String PARAMS_CITY = "city";

	public static final String PARAMS_PAGE_NO = "p";

	public static final String PARAMS_PAGE_SIZE = "n";

	public static final String PARAMS_ID = "id";

	public static final String PARAMS_UID = "uid";

	public static final String PARAMS_PROF_UID = "prof_id";

	public static final String PARAMS_TOKEN = "accesstoken";

	public static final String PARAMS_OPEN_ID = "token";

	public static final String PARAMS_ACTION = "act";

	public static final String PARAMS_CONTENT = "content";

	public static final String PARAMS_MOOD = "mood";

	public static final String PARAMS_FISHING_AGE = "fishing_age";

	public static final String PARAMS_FISHING_ADDRESS = "fishing_address";

	public static final String PARAMS_REPLY_UID = "reply_uid";

	public static final String PARAMS_ADDRESS = "address";

	public static final String PARAMS_MESSAGE = "message";

	public static final String PARAMS_OLD_PASS = "oldpwd";

	public static final String PARAMS_NEW_PASS = "newpwd";

	public static final String PARAMS_MATCH_ID = "match_id";

	public static final String PARAMS_STATE_ID = "state_id";

	public static final String PARAMS_CITY_ID = "city_id";

	public static final String PARAMS_START = "start";

	public static final String PARAMS_END = "end";

	public static final String PARAMS_PEOPLE = "people";

	public static final String PARAMS_FEE = "fee";

	public static final String PARAMS_DISTANCE = "distance";

	public static final String PARAMS_TYPE = "type";

	public static final String PARAMS_PRICE_TYPE = "price_type";

	public static final String PARAMS_PLACE_TYPE = "place_type";

	public static final String PARAMS_NAME = "name";

	public static final String PARAMS_CONTACT = "contact";

	public static final String PARAMS_PHONE = "phone";

	public static final String PARAMS_FEATURE = "feature";

	public static final String PARAMS_SHOP_URL = "shop_url";

	public static final String PARAMS_COVER = "cover";

	public static final String PARAMS_SHOW = "show";

	public static final String PARAMS_GIFT_ID = "gift_id";

	public static final String PARAMS_PERSON = "person";

	public static final String PARAMS_ZIPCODE = "zipcode";

	public static final String PARAMS_DEL_PHOTOS = "del_photos";

	/**
	 * 获取登录接口地址
	 * 
	 * @return
	 */
	public static final String getLoginUrl() {
		return Uri.withAppendedPath(Api.HOST, Api.URL_LOGIN).toString();
	}

	/**
	 * 检查email唯一性接口地址
	 * 
	 * @return
	 */
	public static final String getCheckEmailUrl() {
		return Uri.withAppendedPath(Api.HOST, Api.URL_CHECK_EMAIL).toString();
	}

	/**
	 * 检查手机号码唯一性接口地址
	 * 
	 * @return
	 */
	public static final String getCheckPhoneUrl() {
		return Uri.withAppendedPath(Api.HOST, Api.URL_CHECK_PHONE).toString();
	}

	/**
	 * 获取城市列表接口地址
	 * 
	 * @return
	 */
	public static final String getCityUrl() {
		return Uri.withAppendedPath(Api.HOST, Api.URL_GET_CITY).toString();
	}

	/**
	 * 注册接口地址
	 * 
	 * @return
	 */
	public static final String getRegistUrl() {
		return Uri.withAppendedPath(Api.HOST, Api.URL_REGIST).toString();
	}

	/**
	 * 手机号码注册接口地址
	 * 
	 * @return
	 */
	public static final String getRegistByPhoneUrl() {
		return Uri.withAppendedPath(Api.HOST, Api.URL_REGIST_BY_PHONE).toString();
	}

	/**
	 * 找回密码接口地址
	 * 
	 * @return
	 */
	public static final String getFindPasswordUrl() {
		return Uri.withAppendedPath(Api.HOST, Api.URL_FIND_PASSWORD).toString();
	}

	/**
	 * 资讯列表接口地址
	 * 
	 * @return
	 */
	public static final String getNewsListUrl() {
		return Uri.withAppendedPath(Api.HOST, Api.URL_NEWS_LIST).toString();
	}

	/***
	 * 资讯详情接口地址
	 * 
	 * @return
	 */
	public static final String getNewsDetailUrl() {
		return Uri.withAppendedPath(Api.HOST, Api.URL_NEWS_DETAIL).toString();
	}

	/**
	 * 操作收藏接口
	 * 
	 * @return
	 */
	public static final String getOperateFavoriteUrl() {
		return Uri.withAppendedPath(Api.HOST, Api.URL_OPERATE_FAVORITE).toString();
	}

	/**
	 * 评论资讯接口
	 * 
	 * @return
	 */
	public static final String getSendNewsCommentUrl() {
		return Uri.withAppendedPath(Api.HOST, Api.URL_SEND_NEWS_COMMENT).toString();
	}

	public static final String getIPWeatherUrl() {
		return "https://api.thinkpage.cn/v2/weather/all.json?city=ip&language=zh-chs&unit=c&aqi=city&key=7H7DNC5FGK";
	}

	public static final String getLocationWeatherUrl(double lat, double lng) {
		String location = lat + ":" + lng;
		return String.format("https://api.thinkpage.cn/v2/weather/all.json?city=%s&language=zh-chs&unit=c&aqi=city&key=7H7DNC5FGK", location);
	}

	/**
	 * 获取动态列表接口
	 * 
	 * @return
	 */
	public static final String getTrendsListUrl() {
		return Uri.withAppendedPath(Api.HOST, Api.URL_GET_TRENDS_LIST).toString();
	}

	/**
	 * 更新个人资料接口
	 * 
	 * @return
	 */
	public static final String getUpdateInfoUrl() {
		return Uri.withAppendedPath(Api.HOST, Api.URL_UPDATE_INFO).toString();
	}

	/**
	 * 赞动态接口
	 * 
	 * @return
	 */
	public static final String getLikeTrendsUrl() {
		return Uri.withAppendedPath(Api.HOST, Api.URL_LIKE_TRENDS).toString();
	}

	/**
	 * 回复动态接口
	 * 
	 * @return
	 */
	public static final String getReplyTrendsUrl() {
		return Uri.withAppendedPath(Api.HOST, Api.URL_REPLY_TRENDS).toString();
	}

	/**
	 * 删除动态评论接口
	 * 
	 * @return
	 */
	public static final String getDeleteTrendsCommentUrl() {
		return Uri.withAppendedPath(Api.HOST, Api.URL_DELETE_TRENDS_COMMENT).toString();
	}

	/** 获取附近热门地点 */
	public static final String getBaiduGeoPoisUrl(double lng, double lat) {
		return String.format(Api.URL_BAIDU_POIS, YBApp.BAIDU_KEY, lat, lng);
	}

	/** 发送评论 */
	public static final String getAddTrendsUrl() {
		return Uri.withAppendedPath(Api.HOST, Api.URL_ADD_TRENDS).toString();
	}

	/** 获取动态评论 **/
	public static final String getTrendsCommentListUrl() {
		return Uri.withAppendedPath(Api.HOST, Api.URL_TRENDS_COMMENT_LIST).toString();
	}

	/** 用户协议地址 **/
	public static final String getUserAgreementUrl() {
		return Uri.withAppendedPath(Api.HOST, Api.URL_USER_AGREEMENT).toString();
	}

	/** 积分规则地址 **/
	public static final String getIntegralRuleUrl() {
		return Uri.withAppendedPath(Api.HOST, Api.URL_INTEGRAL_RULE).toString();
	}

	/** 积分兑换说明地址 **/
	public static final String getIntegralExchangeDescriptionUrl() {
		return Uri.withAppendedPath(Api.HOST, Api.URL_INTEGRAL_RULE).toString();
	}

	/** 关于我们地址 **/
	public static final String getAboutUrl() {
		return Uri.withAppendedPath(Api.HOST, Api.URL_ABOUT).toString();
	}

	/** 免责申明地址 **/
	public static final String getDisclaimerUrl() {
		return Uri.withAppendedPath(Api.HOST, Api.URL_DISCLAIMER).toString();
	}

	/** 修改密码接口 */
	public static final String getChangePasswordUrl() {
		return Uri.withAppendedPath(Api.HOST, Api.URL_CHANGE_PASSWORD).toString();
	}

	/** 更新头像接口 */
	public static final String getUpdateAvatarUrl() {
		return Uri.withAppendedPath(Api.HOST, Api.URL_UPDATE_AVATAR).toString();
	}

	/** 更新封面接口 */
	public static final String getUpdateCoverUrl() {
		return Uri.withAppendedPath(Api.HOST, Api.URL_UPDATE_COVER).toString();
	}

	/** 反馈地址 */
	public static final String getFeedbackUrl() {
		return Uri.withAppendedPath(Api.HOST, Api.URL_FEEDBACK).toString();
	}

	/** 查看个人资料 **/
	public static final String getUserProfileUrl() {
		return Uri.withAppendedPath(Api.HOST, Api.URL_OTHER_PROFILE).toString();
	}

	/** 添加黑名单接口 **/
	public static final String getAddBlackListUrl() {
		return Uri.withAppendedPath(Api.HOST, Api.URL_ADD_BLACK_LIST).toString();
	}

	/** 移除黑名单接口 **/
	public static final String getRemoveBlackListUrl() {
		return Uri.withAppendedPath(Api.HOST, Api.URL_REMOVE_BLACK_LIST).toString();
	}

	/** 添加关注接口 **/
	public static final String getAddFollowUrl() {
		return Uri.withAppendedPath(Api.HOST, Api.URL_ADD_FOLLOW).toString();
	}

	/** 取消关注接口 **/
	public static final String getRemoveFollowUrl() {
		return Uri.withAppendedPath(Api.HOST, Api.URL_REMOVE_FOLLOW).toString();
	}

	/** 举报接口 **/
	public static final String getReportUrl() {
		return Uri.withAppendedPath(Api.HOST, Api.URL_REPORT).toString();
	}

	/** 刷新token接口 **/
	public static final String getRefreshTokenUrl() {
		return Uri.withAppendedPath(Api.HOST, Api.URL_REFRESH_TOKEN).toString();
	}

	/** 获取粉丝列表接口 **/
	public static final String getFansListUrl() {
		return Uri.withAppendedPath(Api.HOST, Api.URL_FANS_LIST).toString();
	}

	/** 获取关注列表接口 **/
	public static final String getFollowListUrl() {
		return Uri.withAppendedPath(Api.HOST, Api.URL_FOLLOW_LIST).toString();
	}

	/** 获取黑名单列表接口 **/
	public static final String getBlackListUrl() {
		return Uri.withAppendedPath(Api.HOST, Api.URL_BLACK_LIST).toString();
	}

	/** 获取约钓列表接口 **/
	public static final String getFishingListUrl() {
		return Uri.withAppendedPath(Api.HOST, Api.URL_GET_FISHING).toString();
	}

	/** 获取约钓详情接口 **/
	public static final String getFishingDetailUrl() {
		return Uri.withAppendedPath(Api.HOST, Api.URL_FISHING_DETAIL).toString();
	}

	/** 添加约钓接口 **/
	public static final String getAddFishingUrl() {
		return Uri.withAppendedPath(Api.HOST, Api.URL_ADD_FISHING).toString();
	}

	/** 报名约钓接口 **/
	public static final String getJoinFishingUrl() {
		return Uri.withAppendedPath(Api.HOST, Api.URL_JOIN_FISHING).toString();
	}

	/** 添加约钓评论接口 **/
	public static final String getAddFishingCommentUrl() {
		return Uri.withAppendedPath(Api.HOST, Api.URL_ADD_FISHING_COMMENT).toString();
	}

	/** 获取周边钓友接口 **/
	public static final String getNearFishingFriendUrl() {
		return Uri.withAppendedPath(Api.HOST, Api.URL_GET_NEAR_FISHING_FRIEND).toString();
	}

	/** 获取周边钓场接口 */
	public static final String getNearFishingPlaceUrl() {
		return Uri.withAppendedPath(Api.HOST, Api.URL_GET_NEAR_FISHING_PLACE).toString();
	}

	/** 获取周边渔具店接口 */
	public static final String getNearFishingShopUrl() {
		return Uri.withAppendedPath(Api.HOST, Api.URL_GET_NEAR_FISHING_SHOP).toString();
	}

	/** 上传钓场接口 */
	public static final String getAddFishingPlaceUrl() {
		return Uri.withAppendedPath(Api.HOST, Api.URL_ADD_FISHING_PLACE).toString();
	}

	/** 上传渔具店接口 */
	public static final String getAddFishingShopUrl() {
		return Uri.withAppendedPath(Api.HOST, Api.URL_ADD_FISHING_SHOP).toString();
	}

	/** 获取渔具店详情接口 **/
	public static final String getFishingShopDetailUrl() {
		return Uri.withAppendedPath(Api.HOST, Api.URL_FISHING_SHOP_DETAIL).toString();
	}

	/** 获取钓场详情接口 **/
	public static final String getFishingPlaceDetailUrl() {
		return Uri.withAppendedPath(Api.HOST, Api.URL_FISHING_PLACE_DETAIL).toString();
	}

	/** 获取收藏的列表接口 **/
	public static final String getFavListUrl() {
		return Uri.withAppendedPath(Api.HOST, Api.URL_GET_FAV_LIST).toString();
	}

	/** 获取贡献中的钓场列表接口 **/
	public static final String getContributionFishingPlaceUrl() {
		return Uri.withAppendedPath(Api.HOST, Api.URL_CONTRIBUTION_FISHING_PLACE_LIST).toString();
	}

	public static final String getContributionFishingShopUrl() {
		return Uri.withAppendedPath(Api.HOST, Api.URL_CONTRIBUTION_FISHING_SHOP_LIST).toString();
	}

	/** 获取我的约钓接口 **/
	public static final String getMyFishingUrl() {
		return Uri.withAppendedPath(Api.HOST, Api.URL_MY_FISHING).toString();
	}

	/** 删除动态接口 **/
	public static final String getDeleteTrendsUrl() {
		return Uri.withAppendedPath(Api.HOST, Api.URL_DELETE_TRENDS).toString();
	}

	/** 启动广告图 **/
	public static final String getStartAdUrl() {
		return Uri.withAppendedPath(Api.HOST, Api.URL_GET_START_AD).toString();
	}

	/** 获取积分列表 **/
	public static final String getIntegralListUrl() {
		return Uri.withAppendedPath(Api.HOST, Api.URL_GET_INTEGRAL_LIST).toString();
	}

	/** 获取校验手机验证码 **/
	public static final String getVerifySmsCodeUrl() {
		return Uri.withAppendedPath(Api.HOST, Api.URL_VERIFY_SMS_CODE).toString();
	}

	/** 通过手机号码找回密码 **/
	public static final String getResetPasswordByPhoneUrl() {
		return Uri.withAppendedPath(Api.HOST, Api.URL_CHANGE_PASSWORD_BY_PHONE).toString();
	}

	/** 积分礼品列表 **/
	public static final String getGiftListUrl() {
		return Uri.withAppendedPath(Api.HOST, Api.URL_GIFT_LIST).toString();
	}

	/** 积分礼品兑换 **/
	public static final String getExchangeGiftUrl() {
		return Uri.withAppendedPath(Api.HOST, Api.URL_GIFT_EXCHANGE).toString();
	}

	/** 积分礼品兑换记录 **/
	public static final String getExchangeHistoryUrl() {
		return Uri.withAppendedPath(Api.HOST, Api.URL_EXHANGE_HISTORY).toString();
	}

	/** 获取资讯广告 */
	public static final String getNewsAdUrl() {
		return Uri.withAppendedPath(Api.HOST, Api.URL_GET_NEWS_AD).toString();
	}

	/** 获取热门资讯 **/
	public static final String getHotNewsAdUrl() {
		return Uri.withAppendedPath(Api.HOST, Api.URL_GET_HOT_NEWS).toString();
	}

	/** 微信获取Token地址 **/
	public static final String getWXTokenUrl(String appId, String secret, String code) {
		Uri uri = Uri.parse(Api.URL_WX_API);
		Uri.Builder builder = uri.buildUpon();
		builder.appendQueryParameter("appid", appId);
		builder.appendQueryParameter("secret", secret);
		builder.appendQueryParameter("code", code);
		builder.appendQueryParameter("grant_type", "authorization_code");
		return builder.toString();
	}

	/***
	 * 用户第三方注册/登录
	 * 
	 * @return
	 */
	public static final String getThirdLoginUrl() {
		return Uri.withAppendedPath(Api.HOST, Api.URL_THIRD_LOGIN_URL).toString();
	}
}
